﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="HomeProfileInPersonalInterestsAdmin.ascx.cs"
    Inherits="Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.OpenPersonality.HomeProfileInPersonalInterests" %>
<owc:OwGrid ID="OpenHomeProfilesInPersonalInterestsGrid" runat="server" DataSourceID="OpenHomeProfilesInPersonalInterestsOds"
    SkinID="OwGridAdmin" AutoGenerateColumns="False" OwEnableMessageDisplay="True" 
    OwMessageDisplayType="InPlace" OwMessageDisplayControl="">
    <MasterTableView DataSourceID="OpenHomeProfilesInPersonalInterestsOds" DataKeyNames="OpenHomeProfilesInPersonalInterestsID">
        <CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordText="<%$OwR:AddNewRecordText %>"
            RefreshText="<%$ OwR:RefreshText %>"></CommandItemSettings>
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
        <Columns>
            <owct:GridBoundColumn DataField="OpenHomeProfilesInPersonalInterestsID" FilterControlAltText="Filter OpenHomeProfilesInPersonalInterestsID column"
                HeaderText='<%$OwR:Code %>' SortExpression="OpenHomeProfilesInPersonalInterestsID"
                UniqueName="OpenHomeProfilesInPersonalInterestsID" DataType="System.Int64">
            </owct:GridBoundColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="<%$ OwR:HomeProfileDetails %>"
                UniqueName="TemplateColumn">
                <ItemTemplate>
                    <%#OwOpenHomeProfileDetailsBLL.OwGetEntity((long?)Eval("OpenHomeProfileDetailID")).FullName%>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="<%$ OwR:PersonalInterest %>"
                UniqueName="TemplateColumn">
                <ItemTemplate>
                    <%#OwPersonalInterestsBLL.OwGetEntity((long?)Eval("PersonalInterestID")).Name%>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="<%$ OwR:Modify %>"
                UniqueName="TemplateColumn">
                <ItemTemplate>
                    <asp:ImageButton ID="Editbt" CommandName="Edit" runat="server" ImageUrl="/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/edit.gif" />
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="<%$ OwR:Option %>"
                UniqueName="TemplateColumn">
                <ItemTemplate>
                    <asp:ImageButton CausesValidation="true" OnClientClick='if(!confirm("Are you sure to  Delete?")) return false'
                        ID="EditDeleteButton1" CommandName="Delete" runat="server" SkinID="OwConfirmButton"
                        ImageUrl="/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/delete.gif" />
                </ItemTemplate>
            </owct:GridTemplateColumn>
        </Columns>
        <EditFormSettings EditFormType="Template">
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
            <FormTemplate>
                <fieldset>
                    <legend>
                        <owc:OwR runat="server" OwText="InfoLabel" /></legend>
                    <table>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="HomeProfileDetails" />
                            </td>
                            <td>
                                <owc:OwObjectDataSource ID="OpenHomeProfileDetailsOds" runat="server" OldValuesParameterFormatString="original_{0}"
                                    SelectMethod="OwGetByDynamic" TypeName="Micronet.OpenWeb.Com.BLL.OwOpenHomeProfileDetailsBLL"
                                    DataObjectTypeName="Micronet.OpenWeb.Entity.OwOpenHomeProfileDetailsEntity" DeleteMethod="OwDelete"
                                    InsertMethod="OwInsert" UpdateMethod="OwUpdate">
                                    <SelectParameters>
                                        <asp:Parameter Name="isDeleted" Type="Boolean" DefaultValue="false" />
                                        <asp:Parameter Name="languageCode" Type="String" />
                                        <asp:Parameter Name="openHomeProfileID" Type="Int64" />
                                        <asp:Parameter Name="firstNameID" Type="Int64" />
                                        <asp:Parameter Name="lastNameID" Type="Int64" />
                                        <asp:Parameter Name="isDefault" Type="Boolean" />
                                        <asp:Parameter Name="twelveYearCycleOfAnimalID" Type="Int32" />
                                        <asp:Parameter Name="fiveElementID" Type="Int32" />
                                        <asp:Parameter Name="hometownContinentID" Type="Int64" />
                                        <asp:Parameter Name="hometownCountryID" Type="Int64" />
                                        <asp:Parameter Name="hometownProvinceID" Type="Int64" />
                                        <asp:Parameter Name="hometownDistrictID" Type="Int64" />
                                        <asp:Parameter Name="hometownWardID" Type="Int64" />
                                        <asp:Parameter Name="zodiacID" Type="Int64" />
                                        <asp:Parameter Name="sortClause" Type="String" />
                                        <asp:Parameter Name="sortDirection" Type="String" />
                                        <asp:Parameter Name="startRowIndex" Type="Int32" />
                                        <asp:Parameter Name="maximumRows" Type="Int32" />
                                    </SelectParameters>
                                </owc:OwObjectDataSource>
                                <owc:OwComboBox runat="server" ID="HomeProfileCbb" DataSourceID="OpenHomeProfileDetailsOds"
                                    SkinID="OwCombobox" DataTextField="FullName" DataValueField="OpenHomeProfileDetailID"
                                    EmptyMessage="<%$ OwR:OpenHomeProfileDetailSelect %>" SelectedValue='<%# Bind("OpenHomeProfileDetailID") %>'>
                                </owc:OwComboBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="<%$ OwR:OpenHomeProfileDetailSelect %>"
                                    Text="*" ControlToValidate="HomeProfileCbb" Display="Dynamic"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="PersonalInterest" />
                            </td>
                            <td>
                                <owc:OwObjectDataSource ID="PersonalInterestOds" runat="server" OldValuesParameterFormatString="original_{0}"
                                    SelectMethod="OwGetByDynamic" TypeName="Micronet.OpenWeb.Com.BLL.OwPersonalInterestsBLL"
                                    DataObjectTypeName="Micronet.OpenWeb.Entity.OwPersonalInterestsEntity" DeleteMethod="OwDelete"
                                    InsertMethod="OwInsert" UpdateMethod="OwUpdate">
                                    <SelectParameters>
                                        <asp:Parameter Name="parentID" Type="Int64" />
                                        <asp:Parameter Name="languageCode" Type="String" />
                                        <asp:Parameter Name="sortClause" Type="String" />
                                        <asp:Parameter Name="sortDirection" Type="String" />
                                        <asp:Parameter Name="startRowIndex" Type="Int32" />
                                        <asp:Parameter Name="maximumRows" Type="Int32" />
                                    </SelectParameters>
                                </owc:OwObjectDataSource>
                                <owc:OwComboBox runat="server" ID="PersonalInterestCbb" DataSourceID="PersonalInterestOds"
                                    EmptyMessage="<%$ OwR:PersonalInterestSelect %>" SkinID="OwCombobox" DataTextField="Name"
                                    DataValueField="PersonalInterestID" SelectedValue='<%# Bind("PersonalInterestID") %>'>
                                </owc:OwComboBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="<%$ OwR:PersonalInterestSelect %>"
                                    Text="*" ControlToValidate="PersonalInterestCbb" Display="Dynamic"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td>
                                <owc:OwButton ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                    SkinID="OwButtonAdmin" runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
                                </owc:OwButton>
                                <owc:OwButton ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                                    SkinID="OwButtonAdmin" CommandName="Cancel">
                                </owc:OwButton>
                            </td>
                        </tr>
                    </table>
                </fieldset>
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
    <FilterMenu EnableImageSprites="False">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </FilterMenu>
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </HeaderContextMenu>
</owc:OwGrid>
<owc:OwObjectDataSource ID="OpenHomeProfilesInPersonalInterestsOds" runat="server"
    OldValuesParameterFormatString="original_{0}" SelectMethod="OwGetByDynamic" EnablePaging="True"
    SelectCountMethod="OwGetByDynamicCount" TypeName="Micronet.OpenWeb.Com.BLL.OwOpenHomeProfilesInPersonalInterestsBLL"
    DataObjectTypeName="Micronet.OpenWeb.Entity.OwOpenHomeProfilesInPersonalInterestsEntity"
    DeleteMethod="OwDelete" InsertMethod="OwInsert" UpdateMethod="OwUpdate">
    <SelectParameters>
        <asp:Parameter Name="personalInterestID" Type="Int64" />
        <asp:Parameter Name="openHomeProfileDetailID" Type="Int64" />
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
    <UpdateParameters>
        <asp:Parameter Name="openHomeProfilesInPersonalInterestsID" Type="Int64" />
        <asp:Parameter Name="openHomeProfileDetailID" Type="Int64" />
        <asp:Parameter Name="personalInterestID" Type="Int64" />
    </UpdateParameters>
</owc:OwObjectDataSource>
